<?
	function money($x)
	{
		return '&#8369; '.number_format(floatval($x),2,'.',',');
	}
?>
<style>
	.left{text-align:left;}
	.right{text-align:right;}
</style>
<div class="span10">
	<fieldset>
		<legend>SSS Table</legend>
		<table class="table table-bordered table-striped">
			<thead>
				<tr>
					<td rowspan="3" colspan="2">Range Of Compensation</td>
					<td rowspan="3">Monthly Salary Credit</td>
					<td colspan ="7">Home Employer-Employee</td>
				</tr>
				<tr>
					<td colspan="3">Social Security</td>
					<td>EC</td>
					<td colspan="3">Total Contribution</td>
				</tr>
					<td>ER</td>
					<td>EE</td>
					<td>TOTAL</td>
					<td>ER</td>
					<td>ER</td>
					<td>EE</td>
					<td>TOTAL</td>
				</tr>
			</thead>
			<tbody>
			<?if(!empty($sss)):?>
				<? foreach($sss as $sss): ?>
				<tr>
					<td style="text-align:right;"><?=money($sss->range_of_comp_from);?></td>
					<td style="text-align:right;"><?=money($sss->range_of_comp_to);?></td>
					<td style="text-align:right;"><?=money($sss->monthly_salary_cred);?></td>
					<td style="text-align:right;"><?=$sss->social_security_er;?></td>
					<td style="text-align:right;"><?=$sss->social_security_ee;?></td>
					<td style="text-align:right;"><?=$sss->social_security_total;?></td>
					<td style="text-align:right;"><?=$sss->ec_er;?></td>
					<td style="text-align:right;"><?=$sss->total_contribution_er;?></td>
					<td style="text-align:right;"><?=$sss->total_contribution_ee;?></td>
					<td style="text-align:right;"><?=$sss->total_contribution_total;?></td>
				</tr>
				<?
				endforeach;
			endif;?>
			</tbody>
		</table>
	</fieldset>
</div>